package com.java.annotation;

import java.lang.reflect.Method;

/**
 * @author liyanhao
 * @Date 2023-03-26 18:00
 */
public class Test2 {

    @Hello(value = "hello", method = "method()")
    public static void main(String[] args) throws NoSuchMethodException {
        Class<Test2> test2Class = Test2.class;
        Method main = test2Class.getMethod("main", String[].class);
        Hello annotation = main.getAnnotation(Hello.class);
        String value = annotation.value();
        String method = annotation.method();
        System.out.println(value);
        System.out.println(method);

    }
}
